from kuai.iotool import * 

class QuantumData:
    def __init__(self):
        pass

    def update_mol(self, mol):
        for i in range(len(self.atoms)):
            mol.atoms[i].coords = self.atoms[i].coords
            
class QuantumDataReader(Reader):
    def __init__(self):
        Reader.__init__(self)
        
def read_qmd(file, type = None):
    from kuai.dff.dffqmd import reader
    return reader.read(file)

def get_opt_conform(conforms):
    assert len(conforms) > 0
    result = conforms[0]
    for i in conforms[1:]:
        if i.energy < result.energy:
            result = i
    return result
